#include "CubeVolume.h"

CubeVolume::CubeVolume(D3DXVECTOR3 _Position, float _width, float _height, float _depth)
{
	//m_Position = _Position;
	m_Matrix.m[3][0] = _Position.x;
	m_Matrix.m[3][1] = _Position.y;
	m_Matrix.m[3][2] = _Position.z;

	width = _width;
	height = _height;
	depth = _depth;

	left	= m_Matrix.m[3][0] - _width;
	right	= m_Matrix.m[3][0] + _width;
	bottom	= m_Matrix.m[3][1] - _height;
	top		= m_Matrix.m[3][1] + _height;
	front	= m_Matrix.m[3][2] - _depth;
	back	= m_Matrix.m[3][2] + _depth;

	m_mass = _width * _height * _depth;;
}

void CubeVolume::setCube()
{
	//Empty
}

D3DXVECTOR3 CubeVolume::GetMin()
{
	return D3DXVECTOR3(left, top, front);
}


D3DXVECTOR3 CubeVolume::GetMax()
{
	return D3DXVECTOR3(right, bottom, back);
}
//CubeVolume * CubeVolume::GetPhysicsObject() 
//{
//	return this;
//}

//std::string CubeVolume::GetType()
//{
//	return m_type;
//}